package mips;

import assem.InstrList;

public class Proc extends frame.Proc {
	String head, tail;
	InstrList body;
	
	public Proc(String h, InstrList b, String t) {
		head = h;
		body = b;
		tail = t;
	}
	
	public String getGeneratedCode(regAlloc.RegAlloc ra) {
		StringBuffer sb = new StringBuffer();
		
		sb.append(head);
		for (assem.InstrList i = body; i != null; i = i.tail)
			sb.append(i.head.format(ra));
		return sb.toString();
	}
}
